//
//  NSString+BYCheck.m
//  ZhiHuiLiJiang
//
//  Created by 胡忠诚 on 2018/11/23.
//  Copyright © 2018 WisdomLijiang. All rights reserved.
//字符串解析

#import "NSString+BYCheck.h"

@implementation NSString (BYCheck)

- (id)JSONValue{//Json字符串转id(NSArray、NSDictionary）
    NSData* data = [self dataUsingEncoding:NSUTF8StringEncoding];
    __autoreleasing NSError* error = nil;
    id result = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];
    if (error != nil) return nil;
    return result;
}



@end
